<?php
$this->pageTitle=Yii::app()->name . ' - 管理登陆';
?> 
<script type="text/javascript">
	$(document).ready(function(){
      
        // 连点两次s进入系统管理登陆界面
        var times = 0;
		$( document ).keydown(function( event ) {
			if ( event.which == 83 ) {
				var comp = Date.parse(new Date()) - times;
				if (comp < 800 ) {
					event.preventDefault();
					
					$(".isSuperAdmin").toggle();
					var sss = $(".isSuperAdmin #AdminLoginForm_isSuperAdmin").attr("checked");
					// alert(sss);
					if (sss != "checked"){
						$(".isSuperAdmin #AdminLoginForm_isSuperAdmin").attr("checked",'checked');
					}else{
						$(".isSuperAdmin #AdminLoginForm_isSuperAdmin").attr("checked",false);
					}
				};
				times = times?0: comp;
			}
		});

    });
</script>

<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array('id'=>'login-form',
	'enableClientValidation'=>true,
	'clientOptions'=>array(
		'validateOnSubmit'=>true,
	),
)); ?>
 
	<div class="row errormessage">
		<?php echo $form->error($model,'username'); ?> <?php echo $form->error($model,'password'); ?> 
	</div>

	<div class="row">
		<?php echo $form->textField($model,'username' ,array('class'=>'formUsername','placeholder'=>'用户名','value'=>empty($model->username)?'':$model->username)); ?> 
	</div>

	<div class="row">
		<?php echo $form->passwordField($model,'password',array('class'=>'formPssword','value'=>'' , 'placeholder'=>'密码')); ?> 
	</div>

	<div class="row isSuperAdmin" >
		<?php echo $form->checkBox($model,'isSuperAdmin'); ?>
		<?php echo $form->label($model,'isSuperAdmin'); ?> 
	</div>

	<div class="row buttons">
		<?php echo CHtml::submitButton('登   陆',array('class'=>'subButton')); ?>
	</div>
	

<?php $this->endWidget(); ?>
</div><!-- form -->
